/*
 * BoundingPath.fx
 *
 * Copyright (c) 2010 Remi Barraquand <dev at barraquand.com>. All rights reserved.
 *
 * This file is part of FxTools
 *
 * FxTools is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * FxTools is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with FxTools. If not, see <http://www.gnu.org/licenses/>.
 */

package com.barraquand.labs.jfxtools.geom;

import com.sun.javafx.geom.Path2D;

/**
 * BoundingPath define a custom bounding form that can be use to
 * workout distance between node more precisely than using BoundingBox.
 *
 * @author Remi Barraquand <dev at barraquand.com>
 */

public mixin class BoundingPath {
    protected var boundingPath2D: Path2D;
    public var boundingPoints: Number[] on replace {
        // prevents init nullpointer
        if( boundingPoints.size() > 0 ) {
            boundingPath2D = GeomFx.pointsToPath2D(boundingPoints);
        }
    };
}
